package com.wjc.homework;

/**
 * @author wang'ji'cheng
 * @date 2025/7/13
 */
public class Circle {
    private double r;

    public Circle() {
    }

    public Circle(double r) {
        this.r = r;
    }


    public static void main(String[] args) {
        Circle circle = new Circle(10);
        System.out.println(circle.area());
        System.out.println(circle.length());


    }

    public double area() {
        return Math.PI * r * r;
    }

    public double length() {
        return 2 * Math.PI * r;
    }

}
